﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;
using System.Data;

namespace IHISCETeim.Web.MachineSys.XZModel
{
    public partial class XZUserSelectList : PageBase
    {
        protected string target
        {
            get
            {
                return GetRequestValue<string>("target", "");
            }
        }
        protected string rel
        {
            get
            {
                return GetRequestValue<string>("rel", "");
            }
        }

        #region 属性 (查询条件)

        protected override string orderField
        {
            get
            {
                return string.IsNullOrEmpty(base.orderField) ? "UserId" : base.orderField;
            }
        }
        protected override string orderDirection
        {
            get
            {
                return string.IsNullOrEmpty(base.orderDirection) ? "Asc" : base.orderDirection;
            }
        }

        protected override int numPerPage
        {
            get
            {
                return 200;
            }
        }

        protected string RealName
        {
            get
            {
                return GetRequestValue<string>("RealName");

            }
        }

        protected string RoleId
        {
            get
            {
                return GetRequestValue<string>("RoleId", "");
            }
        }


        protected override string SQLSort
        {
            get
            {
                return " Department desc,RealName ASC ";
            }
        }
        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
        }

        protected void DataBind()
        {
            DataTable DT = new System.Data.DataTable();
            //DT= OUserController.GetPagination(RealName, RoleId, 1, pageNum, numPerPage, SQLSort, ref TotalCount);
            DT = OUserController.GetPagination(RealName, RoleId, 1, pageNum, 99999, SQLSort, ref TotalCount).Select("state=1").CopyToDataTable();
            this.rpMenu.DataSource = DT;
            this.rpMenu.DataBind();
        }

        protected override string DWZRef
        {
            get { return ""; }
        }
    }
}